const routes = [
  {
    path: '/',
    redirect: '/home',
  },
  {
    path: '/home',
    name: 'Home',
    component: () => import('@/views/home/index.vue'),
    meta: {
      title: '首页',
      showWindowBar: true,
    },
  },
  {
    path: '/category',
    name: 'Category',
    component: () => import('@/views/category/index.vue'),
    meta: {
      title: '分类',
      showWindowBar: true,
    },
  },
  {
    path: '/game',
    name: 'Game',
    component: () => import('@/views/game/index.vue'),
    meta: {
      title: '游戏',
      showWindowBar: true,
    },
  },
  {
    path: '/mine',
    name: 'Mine',
    component: () => import('@/views/mine/index.vue'),
    meta: {
      title: '我的',
      showWindowBar: true,
    },
  },
  {
    path: '/serviceDetail',
    name: 'ServiceDetail',
    component: () => import('@/views/ServiceDetail/index.vue'),
    meta: {
      title: '服务商详情',
      showWindowBar: true,
    },
  },
  {
    path: '/recommend',
    name: 'Recommend',
    component: () => import('@/views/recommendDetail/index.vue'),
    meta: {
      title: '推荐详情',
      showWindowBar: true,
    },
  },
  {
    path: '/exchangeRate',
    name: 'ExchangeRate',
    component: () => import('@/views/exchangeRate/index.vue'),
    meta: {
      title: '汇率查询',
      showWindowBar: true,
    },
  },
  {
    path: '/member',
    name: 'Member',
    component: () => import('@/views/member/index.vue'),
    meta: {
      title: '会员查询',
      showWindowBar: true,
    },
  },
  {
    path: '/iframe/:url',
    name: 'iframe',
    component: () => import('@/views/iframe/index.vue'),
    meta: {
      title: 'iframe',
      showWindowBar: true,
    },
  },
  {
    path: '/theme',
    name: 'theme',
    component: () => import('@/views/theme/index.vue'),
    meta: {
      title: '主题风格',
    },
  },
  // Test
  {
    path: '/test',
    component: () => import('@/views/test/index.vue'),
    meta: {
      title: '测试',
    },
  },
  // exception
  {
    path: '/reload',
    component: () => import('@/views/exception/reload.vue'),
    meta: {
      title: '加载异常',
    },
  },
  {
    path: '/404',
    component: () => import('@/views/exception/404.vue'),
    meta: {
      title: '找不到页面',
    },
  },
  // 404 Not found
  { path: '/:path(.*)*', redirect: '/404' },
];

export default routes;
